<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>函数和方法</title>
</head>
<body>
<script>
    const o ={
        name:"tom",
        bark:function () {
            return 'woof';
        }
    }
    console.log(o.bark());
    //ES6方法新写法
    const o1 = {
        name :"jerry",
        bark(){//方法糖
            return 'Woof';
        }
    }
    console.log(o1.bark());
</script>
</body>
</html>